let a = {
    a: '1',
    b: '2'
};
Object.defineProperty(a,'c',{
    enumerable:true,
    configurable:true,
    writable:false,
    value:'static'
});
Object.defineProperties(a,{
    'd':{
        writable:false,
        value:'static'
    },
    'e':{
        configurable:false,
        value:1
    }
});
Object.freeze(a);
Object.seal(c);
console.log(a.c);
a.c = 'new';
console.log(a.c);
let b = Object.assign(a);
a.a = 'new';
console.log(a.a + b.a); // same
let copy = (input) => {
    let output = {};
    for (let key in input) {
        output[key] = input[key];
    }
    return output;
};
let c = copy(a);
a.b = 'newB';
console.log(JSON.stringify(c));
